//本地测试双向绑定数据
DZApp.controller("activitList_new",function($scope,$http){

    $scope.mynews=[
        {myimg:'img/weixin.jpg',mybiao:"资讯",myqian:"所属标签1",mytime:"2934-34-43",myhttp:"http://"},
        {myimg:'img/weixin.jpg',mybiao:"资讯",myqian:"所属标签2",mytime:"2934-34-43",myhttp:"http://"},
        {myimg:'img/weixin.jpg',mybiao:"资讯",myqian:"所属标签3",mytime:"2934-34-43",myhttp:"http://"},
        {myimg:'img/weixin.jpg',mybiao:"资讯",myqian:"所属标签4",mytime:"2934-34-43",myhttp:"http://"},
        {myimg:'img/weixin.jpg',mybiao:"资讯",myqian:"所属标签5",mytime:"2934-34-43",myhttp:"http://"},
        {myimg:'img/weixin.jpg',mybiao:"资讯",myqian:"所属标签6",mytime:"2934-34-43",myhttp:"http://"},
        {myimg:'img/weixin.jpg',mybiao:"资讯",myqian:"所属标签7",mytime:"2934-34-43",myhttp:"http://"},
        {myimg:'img/weixin.jpg',mybiao:"资讯",myqian:"所属标签8",mytime:"2934-34-43",myhttp:"http://"},
        {myimg:'img/weixin.jpg',mybiao:"资讯",myqian:"所属标签9",mytime:"2934-34-43",myhttp:"http://"},
        {myimg:'img/weixin.jpg',mybiao:"资讯",myqian:"所属标签10",mytime:"2934-34-43",myhttp:"http://"},
        {myimg:'img/weixin.jpg',mybiao:"资讯",myqian:"所属标签11",mytime:"2934-34-43",myhttp:"http://"},
        {myimg:'img/weixin.jpg',mybiao:"资讯",myqian:"所属标签12",mytime:"2934-34-43",myhttp:"http://"},
        {myimg:'img/weixin.jpg',mybiao:"资讯",myqian:"所属标签13",mytime:"2934-34-43",myhttp:"http://"},
        {myimg:'img/weixin.jpg',mybiao:"资讯",myqian:"所属标签14",mytime:"2934-34-43",myhttp:"http://"}
    ]

    $scope.baocun = function(){
    	console.log($scope.modifyModel);
    	$http({
			method: 'POST',
			url: '',
			data: $.param($scope.modifyModel),
			headers: {
				'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8'
			},
			cache: false
		}).success(function(data) {
			console.log(data);
		});
    };
    $scope.sure_delete  = function(index){
        //删除选定的对象
        $scope.mynews.splice($scope.currentIndex,1);
    };
    $scope.mySave = function(){
        //通过获取对象的某个属性值 进行修改
        $scope.mynews[$scope.currentIndex].myimg=$scope.newsimgages;
        $scope.mynews[$scope.currentIndex].mybiao=$scope.biaotiming;
        $scope.mynews[$scope.currentIndex].myqian=$scope.biaoqianming;
        $scope.mynews[$scope.currentIndex].myimg=$scope.newtimes;
        $scope.mynews[$scope.currentIndex].myhttp=$scope.newslianjie;
    }

    $scope.saves=function(){
        console.log($scope.newsname);
        var b={
            myimg:$scope.newimg,
            mybiao:$scope.biaotinews,
            myqian:$scope.selectedSite,
            mytime:"",
            myhttp:$scope.wangzhinews

        };
        $scope.mynews.push(b);
    
    }; 
});



   
    
    
